<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>角色列表</title>
   <link href="${basePath}/admin/css/base.css" type="text/css" rel="stylesheet">
</head>
<body>
	
<div id="container" style="background:#f2ffe3 url(${basePath}/admin/images/main_00.jpg) left top repeat-x;">
     <h3 style="height:30px;">
     <a class="button_60" href="${basePath}/admin/module/view">添加新纪录</a>
     <a class="button_60" href="${basePath}/admin/module/refreshCache">刷新缓存</a>
    </h3>
      <table class="dataTable">
          <tr>
	          <th>ID</th>
	          <th>名称</th>
	          <th>控制面板名称</th>
	          <th>跳转路径</th>
	          <th>操作</th>
          </tr>
          <#assign parentList = action.listByPid(0)>
          <#list parentList as p>
	          <tr>
		          <td>${p.id!}</td>
		          <td>|-${p.name!}</td>
		          <td>${p.menu_name!}</td>
		          <td>${p.url!}</td>
		          <td>
		          	<a href="${basePath}/admin/module/view?id=${p.id!}">修改</a>
		          	<a href="${basePath}/admin/module/delete?id=${p.id!}" onclick="return confirm('你确认要删除这条记录?')">删除</a>
		          </td>
	          </tr>
	          <#assign childList = action.listByPid(p.id)>
	          <#if childList??>
	          	<#list childList as c>
	          		<tr>
			          <td>${c.id!}</td>
			          <td>&nbsp;|--${c.name!}</td>
			          <td>${c.menu_name!}</td>
			          <td>${c.url!}</td>
			          <td>
			          	<a href="${basePath}/admin/module/view?id=${c.id!}">修改</a>
			          	<a href="${basePath}/admin/module/delete?id=${c.id!}" onclick="return confirm('你确认要删除这条记录?')">删除</a>
			          </td>
	          		</tr>
	          	</#list>
	          </#if>
          </#list>
   	</table>
   	
  </div>

</body>
</html>